﻿using System;

namespace Extensions.Attribute.Cache;

[AttributeUsage(AttributeTargets.Method, Inherited = true)]
public abstract class BaseCacheAttribute : System.Attribute
{
    /// <summary>
    /// cacheKey
    /// </summary>
    public string Key { get; set; }
    /// <summary>
    /// 对于redis的hash的value的设置 其他情况可以忽略
    /// </summary>
    public string Value { get; set; }
    /// <summary>
    /// 定义行动
    /// </summary>
    public CacheActionEnum Action { get; set; }
    /// <summary>
    /// 过期时间 默认是 5*60s
    /// </summary>
    public int ExpireSeconds { get; set; } = 5 * 60;

    /// <summary>
    /// 排序值(如果有多个  执行的顺序  从大到小执行)
    /// </summary>
    public int OrderNum { get; set; } = 0;
}